// 收集所有的 group
export function collectGroups(arr: any[]) {
  const result: any[] = [];
  arr.forEach((item) => {
    result.push({
      ...item,
      belong: item.name,
      disabledA: false,
      disabledB: false,
    });
  });
  // return arr.map((item) => item.group);
  return result;
}

// 收集所有用户所在的组
export function collectUsers(arr: any[]) {
  const result: any[] = [];
  arr.forEach((item) => {
    result.push({
      ...item,
      belong: item.groups,
      disabledA: false,
      disabledB: false,
    });
  });
  return result;
}
